let addBook = document.getElementById("add-book");
addBook.onclick =function (){
    window.location="creatbook.html";
}
//我的上传列表
var upload = new Vue({
    el:'#upload',
    data:{
        books:[]
    }
});
//收藏列表
var collect = new Vue({
    el:'#collect',
    data:{
        books:[]
    }
});

axios.get("/getMyBook")
    .then(function (response){
        let data = response.data;
        upload.books = data.list;
    });
axios.get("/getCollect")
    .then(function (response){
        console.log(response);
        let data = response.data;
        collect.books =data.collect;
    });

function loadToTetails (e) {
    e=e.currentTarget;
    console.log(e);
    window.location ="book.html?bid="+e.getAttribute("bid")+
        "&brief="+e.getAttribute("brief")+
        "&cover="+e.getAttribute("cover")+
        "&name="+e.getAttribute("name");
}
